<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>   
    <base href="<%=basePath%>"/>
    <title>广元电业局低质易耗品管理平台</title>
	<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
	<!-- DTree -->
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/jquery.blockUI.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/dtree.js"></script>
	
	<!-- DWR -->
	<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/interface/categoryManager.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
</head>
<body class="ContentBody" >
<form action="ac/saveOrUpdate.action" method="post">
<div class="MainDiv">
	<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
		  <tr>
		      <th class="tablestyle_title" >资产类型信息录入</th>
		  </tr>
		  <tr>
		    <td class="CPanel">
				<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
				<tr>		
				   <td width="100%">
					  <fieldset style="height:100%;">
						<legend>资产类型信息</legend>	
							<input class="text"  type="hidden" value="<s:property value='ac.acid' />" id="assetCategoryId" name="ac.acid"/>
								<center>
									<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
									<tr>
									  <td>资产名称:</td>
									  <td><input class="text"  name="ac.acname" value="<s:property value="ac.acname" />"/></td>
									  <td>资产简称:</td>
									  <td><input class="text"  name="ac.acanothername" value="<s:property value="ac.acanothername"/>"/></td>
									</tr>
									<tr>
									  <td>资产类别名称:</td>
									  <td><input class="text"  name="ac.category.catid" value="<s:property value="ac.category.catid"/>"/></td>
									  <td>申报原因:</td>
									  <td><input class="text"  name="ac.reportreason" value="<s:property value="ac.reportreason"/>"/></td>
									</tr> 
									<tr>
									  <td>资金来源:</td>
									  <td><input class="text"  name="ac.assetcomefrom" value="<s:property value="ac.assetcomefrom"/>"/></td>
									  <td>申请部门:</td>
									  <td><input class="text"  name="ac.reportdepartment" value="<s:property value="ac.reportdepartment"/>"/></td>
									</tr>
									<tr>
									  <td>资产规格:</td>
									  <td><input class="text"  name="ac.category.catnorms" value="<s:property value="ac.category.catnorms"/>"/></td>
									  <td>生产日期:</td>
									  <td><input class="text"  name="ac.producedate" value="<s:date name="ac.producedate" format="yyyy-MM-dd hh:mm"/>" onclick="WdatePicker()"/></td>
									</tr>
									<tr>
									  <td>使用期限:</td>
									  <td><input class="text"  name="ac.lifetime" value="<s:property value="ac.lifetime"/>"/></td>
									  <td>预计停用日期:</td>
									  <td><input class="text"  name="ac.planstopdate" value="<s:date name="ac.planstopdate" format="yyyy-MM-dd hh:mm" />" onclick="WdatePicker()"/></td>
									</tr>
									<tr>
									  <td>实际停用日期:</td>
									  <td><input class="text" name="ac.actualstopdate" id="producedate" value="<s:date name="ac.actualstopdate" format="yyyy-MM-dd hh:mm"/>"  onclick="WdatePicker()"/></td>
									  <td>单价:</td>
									  <td><input class="text"  name="ac.orderprice" value="<s:property value="ac.orderprice"/>"/></td>
									</tr>
									<tr>
									  <td>资产使用人:</td>
									  <td><input class="text"  name="ac.acuser" value="<s:property value="ac.acuser"/>"/></td>
									  <td>所在部门:</td>
									  <td><input class="text"  name="ac.depname" value="<s:property value="ac.depname"/>"/></td>
									</tr>
									<tr>
									  <td>凭证编号:</td>
									  <td><input class="text"  name="ac.orderid" value="<s:property value="ac.orderid"/>"/></td>
									  <td>凭证会计科目:</td>
									  <td><input class="text"  name="ac.accountsubject" value="<s:property value="ac.accountsubject"/>"/></td>
									</tr>
									<tr>
									  <td>计量单位:</td>
									  <td><input class="text"  name="ac.category.catunit" value="<s:property value="ac.category.catunit"/>"/></td>
									  <td>生产厂家:</td>
									  <td><input class="text"  name="ac.producer" value="<s:property value="ac.producer"/>"/></td>
									</tr>
									<tr>
									  <td>报废处置去向:</td>
									  <td><input class="text"  name="ac.scrapmanage" value="<s:property value="ac.scrapmanage"/>"/></td>
									  <td>报废残值:</td>
									  <td><input class="text"  name="ac.scrapworth" value="<s:property value="ac.scrapworth"/>"/></td>
									</tr>
									<tr>
									  <td>资产状态:</td>
									  <td><input class="text"  name="ac.acstatus" value="<s:property value="ac.acstatus"/>"/></td>
									  <td>&nbsp;</td>
									  <td>&nbsp;</td>
									</tr>
								</table>
								</center>
						</fieldset>
					</td>
				</tr>
				</table>	
		 	</td>
		</tr>			
		<tr>
			<td colspan="2" align="center" height="50px">
			<input type="submit" name="Submit" value="保存" class="button"/>
			<input type="button" name="Submit2" value="返回" class="button" onclick="window.history.go(-1);"/>
			<div align="right"><input type="button" name="dele" value="删除" class="button" onclick="del()"/></div>
			</td>
		</tr> 
	</table>
</div>
</form>
<script type="text/javascript">
 function del(){
	 var caid = document.getElementById("assetCategoryId").value;
	if(confirm("确定要删除本条记录吗？删除之后数据将不能恢复!")){
	 	location.href = "ac/delAssetCard.action?acid="+caid;
	 }
}
</script>
</body>
</html>